/*
 * @Author: huangge
 * @Date: 2018-04-24 10:11:37
 * @Last Modified by: huangge
 * @Last Modified time: 2018-04-25 10:44:55
 * @description: 编辑页面所有类型组件配置
 */
function getBase64Image(imageName) {
  return require(`@/assets/charts/${imageName}`);
}

export const BasicChart = [
  {
    name: '基础折线图',
    type: 'k-line',
    id: 'simpleLine',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 1,
        max: 'infinite',
      },
    },
    description: '1个或2个维度，1个或多个数值',
    img: getBase64Image('line-basic.png'),
  },
  {
    name: '双轴折线图',
    type: 'k-line',
    id: 'doubleLine',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 2,
        max: 'infinite',
      },
    },
    description: '1个或2个维度，2个或多个数值',
    img: getBase64Image('line-biaxial.png'),
  },
  {
    name: '堆叠折线图',
    type: 'k-line',
    id: 'stackLine',
    options: {
      dimension: {
        min: 1,
        max: 1,
      },
      metrics: {
        min: 1,
        max: 'infinite',
      },
    },
    description: '1个维度，1个或多个数值',
    img: getBase64Image('line-area.png'),
  },
  {
    name: '基础柱状图',
    type: 'Histogram',
    id: 'simpleHistogram',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 1,
        max: 'infinite',
      },
    },
    description: '2个以内维度，1个或多个数值',
    img: getBase64Image('histogram-basic.png'),
  },
  {
    name: '双轴柱状图',
    type: 'Histogram',
    id: 'doubleHistogram',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 1,
        max: 'infinite',
      },
    },
    description: '2个以内维度，1个或多个数值',
    img: getBase64Image('histogram-basic.png'),
  },
  {
    name: '堆叠柱状图',
    type: 'Histogram',
    id: 'stackHistogram',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 2,
        max: 'infinite',
      },
    },
    description: '1个或2个维度，2个或多个数值',
    img: getBase64Image('histogram-superposition.png'),
  },
  {
    name: '混合柱状图',
    type: 'Histogram',
    id: 'lineHistogram',
    options: {
      dimension: {
        min: 1,
        max: 1,
      },
      metrics: {
        min: 2,
        max: 'infinite',
      },
    },
    description: '1个维度，2个或多个数值',
    img: getBase64Image('histogram-basic.png'),
  },
  {
    name: '基础条形图',
    type: 'Bar',
    id: 'simpleBar',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 2,
        max: 'infinite',
      },
    },
    description: '1个或2个维度，2个或多个数值',
    img: getBase64Image('bar-basic.png'),
  },
  {
    name: '双轴条形图',
    type: 'Bar',
    id: 'doubleBar',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 1,
        max: 'infinite',
      },
    },
    description: '2个以内维度，1个或多个数值',
    img: getBase64Image('bar-basic.png'),
  },
  {
    name: '堆叠条形图',
    type: 'Bar',
    id: 'stackBar',
    options: {
      dimension: {
        min: 1,
        max: 2,
      },
      metrics: {
        min: 2,
        max: 'infinite',
      },
    },
    description: '1个或2个维度，2个或多个数值',
    img: getBase64Image('bar-basic.png'),
  },
  {
    name: '饼图',
    type: 'Pie',
    id: 'pie',
    options: {
      dimension: {
        min: 1,
        max: 1,
      },
      metrics: {
        min: 1,
        max: 1,
      },
    },
    description: '1个维度 1个数值',
    img: getBase64Image('pie-basic.png'),
  },
  {
    name: '散点图',
    type: 'Scatter',
    id: 'scatter',
    options: {
      dimension: {
        min: 1,
        max: 1,
      },
      metrics: {
        min: 2,
        max: 2,
      },
    },
    description: '1个维度，2个数值',
    img: getBase64Image('scatter-basic.png'),
  },
  {
    name: '仪表盘',
    type: 'Gauge',
    id: 'gauge',
    options: {
      dimension: {
        min: 1,
        max: 1,
      },
      metrics: {
        min: 1,
        max: 1,
      },
    },
    description: '1个维度，1个数值',
    img: getBase64Image('gauge-basic.png'),
  },
];

export const MapItem = [
  // {
  //   name: '地图分屏',
  //   type: 'scrillayer',
  //   id: 'scrillayer',
  //   img: getBase64Image('map-contrast.png'),
  // },
  // {
  //   name: '地图卷帘',
  //   type: 'stamenLayer',
  //   id: 'stamenLayer',
  //   img: getBase64Image('map-contrast.png'),
  // },
  {
    name: '分段渲染图',
    type: 'RenderMap',
    id: 'renderMap',
    img: getBase64Image('map-superposition.png'),
  },
  {
    name: '热力图',
    type: 'HeatMap',
    id: 'heatMap',
    img: getBase64Image('map-heatmap.png'),
  },
  {
    name: '散点图',
    type: 'ScatterMap',
    id: 'scatterMap',
    img: getBase64Image('scatter-basic.png'),
  },
];
